/*
 * storage.h
 *
 *  Created on: 9-dic-2008
 *      Author: igor
 */

#ifndef STORAGE_H_
#define STORAGE_H_

#import <sqlite3.h>
#include "../enotes.h"

/* FUNCTION PROTOTIPES */
/* ITEM MANAGEMENT */
/* read an item from db */
struct todoitem *leggi_items_da_db(struct todoitem *tdi);
/* add an item into db */
struct todoitem *add_item_into_db(struct todoitem *tdi);
/* mod item nel db */
struct todoitem *mod_item_into_db(struct todoitem *tdi);
/* delete an entry from db */
struct todoitem *del_item_from_db(struct todoitem *tdi);

/* CATEGORY MANAGEMENT */
/* aggiunge una categoria al database */
char *add_cat_into_db(char *name);
/* leggo le categorie dal database */
struct charlist *leggi_cat_da_db(struct charlist *p);
/* delete a category */
char *del_cat_from_db(char *name);

#endif /* STORAGE_H_ */
